package com.peas.platform.module.icims.base.mdm.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 公告
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_announce`")
public class AnnouncePo extends BasePo {

    // 公告类型
    // 枚举取值:AnnounceType
    @Comment(value = "公告类型", enumType = "AnnounceType")
    @Size(max = 20, message = "公告类型不能超过20个字符")
    @TableField(value = "`announce_type`", jdbcType = JdbcType.VARCHAR)
    private String announceType;

    // 公告标题
    @Comment(value = "公告标题")
    @Size(max = 100, message = "公告标题不能超过100个字符")
    @TableField(value = "`title`", jdbcType = JdbcType.VARCHAR)
    private String title;

    // 公告内容
    @Comment(value = "公告内容")
    @TableField(value = "`content`", jdbcType = JdbcType.CLOB)
    private String content;

    // 状态
    // 枚举取值:CommonEnableDisable
    @Comment(value = "状态", enumType = "CommonEnableDisable")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 附件ID
    // （附件表）外键
    @Comment(value = "附件ID")
    @TableField(value = "`attachment_id`", jdbcType = JdbcType.BIGINT)
    private Long attachmentId;

    // 附件名称
    @Comment(value = "附件名称")
    @Size(max = 100, message = "附件名称不能超过100个字符")
    @TableField(value = "`attachment_name`", jdbcType = JdbcType.VARCHAR)
    private String attachmentName;

    // 附件URL
    @Comment(value = "附件URL")
    @Size(max = 200, message = "附件URL不能超过200个字符")
    @TableField(value = "`attachment_url`", jdbcType = JdbcType.VARCHAR)
    private String attachmentUrl;

}
